import Vue from 'vue'
import Vuex from 'vuex'

import center from '@/store/modules/center'
import login from '@/store/modules/login'
import classify from '@/store/modules/classify'
import detail from '@/store/modules/detail'
import home from '@/store/modules/home'
import pay from '@/store/modules/pay'
import shopcart from '@/store/modules/shopcart'
import worthbuy from '@/store/modules/worthbuy'
import register from '@/store/modules/register'

Vue.use(Vuex)
//存储数据，初始化状态数据 ，页面刷新需要重新初始化
const state = {

}
const mutations = {}

const actions = {}

// 其实它是用来简化数据的操作的
const getters = {}


export default new Vuex.Store({
  state,
  mutations,
  actions,
  getters,
  // 合并小的store到总的store
  modules:{
    center,
    login,
    classify,
    detail,
    home,
    pay,
    shopcart,
    worthbuy,
    register
  }
})

